import moment from 'moment';
// 命名规范：Arr普通枚举  field下拉字段枚举  Map表格字段枚举

// 表头筛选字段
const headerForm = {};
// 表格字段
const tableColumn = {
  // 得分标签表格
  addOptionTableMap: [
    { prop: 'id', label: 'ID', type: 'text', width: 130 },
    { prop: 'title', label: '标签名称', type: 'text' },
    { prop: 'levelStr', label: '层级', type: 'text' },
    { prop: 'manRatio', label: '男系数', type: 'text' },
    { prop: 'womanRatio', label: '女系数', type: 'text' },
    { prop: 'maxValue', label: '最大值', type: 'text' },
    { prop: 'countRulesStr', label: '计算规则', type: 'text' },
    { prop: 'isRadarStr', label: '雷达显示', type: 'text' },
    { prop: 'statusStr', label: '状态', type: 'text' },
    { prop: 'createTime', label: '创建时间', type: 'text', width: 160 },
    { prop: 'updateTime', label: '更新时间', type: 'text', width: 160 },
  ],
};
// 表单字段
const editForm = {
  // 得分标签筛选表单
  addOptionFilterMap: [],
  // 得分标签新增信息表单
  addOptionFormMap: [
    {
      prop: 'zeroLabelId',
      type: 'select',
      label: '0级标签',
      optionDynamic: {
        apiKey: 'AllLabelList',
        params: 0,
        methods: 'get',
      },
      optionValue: 'id',
      optionLabel: 'title',
      col: 24,
    },
    {
      prop: 'oneLabelId',
      type: 'select',
      label: '1级标签',
      optionDynamic: {
        apiKey: 'AllLabelList',
        params: 1,
        methods: 'get',
      },
      optionValue: 'id',
      optionLabel: 'title',
      col: 24,
    },
    {
      prop: 'twoLabelId',
      type: 'select',
      label: '2级标签',
      optionDynamic: {
        apiKey: 'AllLabelList',
        params: 2,
        methods: 'get',
      },
      optionValue: 'id',
      optionLabel: 'title',
      col: 24,
    },
  ],
};
// 其他映射
const otherMap = {};
// 表单字段校验
const editRule = {
  addOptionFormRule: {
    zeroLabelId: [{ required: true, message: '请选择0级标签', trigger: 'change' }],
    oneLabelId: [{ required: true, message: '请选择1级标签', trigger: 'change' }],
    twoLabelId: [{ required: true, message: '请选择2级标签', trigger: 'change' }],
  },
};
export default {
  headerForm,
  tableColumn,
  editForm,
  otherMap,
  editRule,
};
